package com.eightbears.beboy.base.util;

import android.os.Environment;

import com.eightbears.beboy.R;

/**
 * Created by baoga on 2017/7/3.
 */

public class CommonAPI {

    public static final String WECHAT_APP_ID = "wx52064d18c1389f26";

    public static final String WITHDRAW="withDraw";//区分提现

    public static final String STATUS_UNUSE = "0";
    public static final String STATUS_USE = "1";
    public static final String STATUS_END_DATE = "2";
    public static final String STATUS_APPLY_REFOUND = "3";
    public static final String STATUS_REFOUND_SUCCESS = "4";
    public static final String STATUS_ALREADY_COMMENT = "5";
    public static final String STATUS_BUY = "6";
    public static final String STATUS_CANCEL = "7";
    public static final String WEIXIN_APP_ID = "wx52064d18c1389f26";
    public static final String WEIXIN_SECRET_ID = "9e1c043ab8a99bd7d34a39557bb8dfd4";

    public static final String STATUS_ORDER_WAIT_PAY = "0";
    public static final String STATUS_ORDER_USE = "1";
    public static final String STATUS_ORDER_APPLY_REFOUND = "3";
    public static final String STATUS_ORDER_REFOUND_SUCCESS = "4";
    public static final String STATUS_ORDER_APPLY_COMMENT = "5";

    // 常量
    public static final String PACKAGE_NAME_AMAP = "com.autonavi.minimap";
    public static final String PACKAGE_NAME_BAIDU = "com.baidu.BaiduMap";
    public static final String NEW_FRIENDS_USERNAME = "item_new_friends";
    public static final String GROUP_USERNAME = "item_groups";
    public static final String CHAT_ROOM = "item_chatroom";
    public static final String ACCOUNT_REMOVED = "account_removed";
    public static final String ACCOUNT_CONFLICT = "conflict";
    public static final String ACCOUNT_FORBIDDEN = "user_forbidden";
    public static final String CHAT_ROBOT = "item_robots";
    public static final String MESSAGE_ATTR_ROBOT_MSGTYPE = "msgtype";
    public static final String ACTION_GROUP_CHANAGED = "action_group_changed";
    public static final String ACTION_CONTACT_CHANAGED = "action_contact_changed";
    public static final String MESSAGE_ATTR_IS_VOICE_CALL = "is_voice_call";
    public static final String MESSAGE_ATTR_IS_VIDEO_CALL = "is_video_call";
    public static final String MESSAGE_ATTR_IS_BIG_EXPRESSION = "em_is_big_expression";
    public static final String MESSAGE_ATTR_EXPRESSION_ID = "em_expression_id";
    public static final String MESSAGE_ATTR_AT_MSG = "em_at_list";
    public static final String MESSAGE_ATTR_VALUE_AT_MSG_ALL = "ALL";
    public static final int CHATTYPE_SINGLE = 1;
    public static final int CHATTYPE_GROUP = 2;
    public static final int CHATTYPE_CHATROOM = 3;
    public static final String EXTAR_POSITION = "position";
    public static final String EXTRA_CHAT_TYPE = "chatType";
    public static final String EXTRA_USER_ID = "userId";
    public static final String PARAM_URL_PAGE = "page";
    public static final String PARAM_URL_SIZE = "size";
    public static final String PARAMS_VIP_LEVE_1 = "白银VIP";
    public static final String PARAMS_VIP_LEVE_2 = "黄金VIP";
    public static final String PARAMS_BALANCE = "balance";


    //chat
    public static final String MESSAGE_TYPE_SYSTEM_COMMENT = "4";
    public static final String MESSAGE_TYPE_SYSTEM = "6";
    public static final String MESSAGE_TYPE_RESERVATION = "8";

    // 聊天透传消息
    public static final String GROUP_NEW_MEMBER_ADD = "newMemberAdd";
    public static final String GROUP_TICHU_MEMBER = "tichuMember";
    public static final String GROUP_TUICHU_MEMBER = "tuichuMember";
    public static final String GROUP_EXCHANGE_GROUP_COVER = "exchangeGroupCover";
    public static final String GROUP_EXCHANGE_GROUP_NAME = "exchangeGroupName";
    public static final String GROUP_EXCHANGE_GROUP_NOTICE = "exchangeGroupNotice";

    public static final String PARAMS_GROUP_ID = "group_id";
    public static final String PARAMS_USER_ID = "user_id";
    public static final String PARAMS_USERS_ID = "users";
    public static final String PARAMS_GROUP_COVER = "cover";
    public static final String PARAMS_GROUP_NAME = "name";
    public static final String PARAMS_GROUP_NOTICE = "notice";


    public static final String transferType = "transferAmount";


    // 缓存
    public static String CACHE_FILE = Environment.getExternalStorageDirectory() + "/beboy/";
    public static String CAHCE_VIDEO_FILE = CACHE_FILE + "video/cache/";
    public static String CAHCE_IMAGE_FILE = CACHE_FILE + "image/";
    public static String CACHE_HEAD_FILE = CAHCE_IMAGE_FILE + "head/";

    // 等级
    public static int[]  ICON_LEVEL_SEL = new int[]{R.mipmap.level_1_sel, R.mipmap.level_2_sel,
            R.mipmap.level_3_sel, R.mipmap.level_4_sel, R.mipmap.level_5_sel};
    public static int[]  ICON_LEVEL = new int[]{R.mipmap.icon_level_1, R.mipmap.icon_level_2,
            R.mipmap.icon_level_3, R.mipmap.icon_level_4, R.mipmap.icon_level_5};
    public static int[] TEXT_LEVE = new int[]{R.string.text_level_1 ,R.string.text_level_2,
            R.string.text_level_3, R.string.text_level_4, R.string.text_level_5};

    // 搜索类型 值为1是搜索主页帖子
    public static final String SEARCH_KEY_POST = "1";
    public static final String SEARCH_KEY_POST_SHOP = "2";
    public static final int delayMillis = 300;
    // 真假
    public static final String STATUS_FALSE = "0";
    public static final String STATUS_TRUE = "1";

    // 本地存储
    public static final String CACHE_USER = "cacheUser";
    public static final String CACHE_STATUS_DATA = "statusData";
    public static final String CACHE_DISTRICT_VERSION = "districtVersion";
    public static final String CACHE_ACCESSTOKEN = "accesstoken";
    public static final String CACHE_APP_FILE_PATH = "appFilePath";
    public static final String CACHE_WCHAT = "cacheWchat";
    public static final String CACHE_USER_LOCALCATION = "userLocaltion";
    public static final String CACHE_USER_SELECT_CLASSIFY = "selectClassify";
    public static final String CACHE_FIRST_OPEN = "firstOpen";
    public static String CACHE_APP = CACHE_FILE + "update/";

    // 网络请求常量
    public static final String KEY_HTTP_HEADER = "Authorization";
    public static final String KEY_HTTP_HEADER_ACCEPT = "Accept";
    public static final String KEY_HTTP_HEADER_ACCEPT_VALUE = "application/x.beboy.v2+json";
    public static final String PARAMS_PAGE_SIZE = "20";
    public static final String PAGE_SIZE = "10";

    // 商铺类型
    public static final String TYPE_SHOP_SHUILIAO = "1";
    public static final String TYPE_SHOP_KTV = "2";
    public static final String TYPE_SHOP_YEZONGHUI = "3";
    public static final String TYPE_SHOP_BAR = "4";
    public static final String TYPE_SHOP_MUZU = "5";
    public static final String TYPE_SHOP_OTHER = "12";

    public static final String SERVERS = "http://api.beboy.me:80/";
//    public static final String SERVERS = "http://api.beboy.me:8081/";
    // 商城
    public static final String URL_SUBMIT_BOOKS = SERVERS + "api/booked";
    // 阿里
    public static final String URL_REFUND_ALIPAY = SERVERS + "api/payment/ali/refund";
    // 微信
    public static final String URL_REFUND_WCHAT = SERVERS + "api/payment/wechat/refund";

    // URL
    public static final String URL_VERIFICATION_CODE = SERVERS + "api/sms";// 发送短信验证码接口
    public static final String URL_LOGIN = SERVERS + "api/login"; // 登陆接口(post)
    public static final String URL_WEICHAT_LOGIN = "https://api.weixin.qq.com/sns/oauth2/access_token"; // 微信openid
    public static final String URL_RESET_CODE = SERVERS + "api/user/password"; // 设置/重置密码
    public static final String URL_RESET_PAY_CODE = SERVERS + "api/users/paymentPassword"; // 设置/重置密码

    public static final String URL_REGISTER = SERVERS + "api/reg";   //  注册
    public static final String URL_STATIC_DATA = SERVERS + "/api/tool/statisticsData";

    public static final String URL_FRIENDS_LIST = SERVERS + "api/im/friends";//好友列表
    public static final String URL_GROUP_LIST = SERVERS + "api/im/groups";
    public static final String URL_GROUP_MEMBERS_LIST = SERVERS + "api/im/groups/";
    public static final String URL_COMMODITY_LIST = SERVERS + "api/product/list";
    public static final String URL_SHOPS_LIST = SERVERS + "api/shops/";//商家列表(GET)
    public static final String URL_SHOPS_DETAILS = SERVERS + "api/shop/";//商家详情{id}(GET)
    public static final String URL_SHOPS_COMMENT = SERVERS + "api/shop/comment/";//添加评论(POST)
    public static final String URL_COMMENT_LIST = SERVERS + "api/shop/{id}/comments";//评论列表(GET)?page={page}&size={size}
    public static final String URL_TEXT_LIST = "http://api.nowfc.com/Umusic/commentList";
    public static final String URL_SHOP_MANAGER = SERVERS + "api/shop/manager/application";//申请该店经理
    public static final String URL_SHOP_APPLIACTION = SERVERS + "api/shops/application/";//商家入驻/api/shops/application
    public static final String URL_FOUCE_SHOP = SERVERS + "/api/shop";//关注商家(POST)
    public static final String URL_ADD_SHOPMEAL = SERVERS + "/api/shops/";//添加套餐(POST)
    public static final String URL_BUYMEAL_LIST = SERVERS + "/api/shopCouponPurchases?page={page}&size={size}";//套餐购买记录列表(GET)
    public static final String URL_ORDER_DETAIL = SERVERS + "api/shopCoupons/";
    public static final String URL_PAY_ALIPAY = SERVERS + "api/payment/ali/orderInfo";
    public static final String URL_PAY_MYPAY = SERVERS + "api/payment/balance";
    public static final String URL_PAY_WEIXIN = SERVERS + "api/payment/wechat/preOrder";
    public static final String URL_SHARE = SERVERS + "api/tool/shareData";
    public static final String URL_SHARE_CALL_BACK = SERVERS + "api/post/";
    public static final String URL_USER_DATA = SERVERS + "api/user";//修改用户资料(PSOT)
    public static final String URL_USER_QUERY = SERVERS + "api/user/nickname/validation?nickname={nickname}";//修改用户资料(GET)
    public static final String URL_USER_UPDATEADDRESS = SERVERS + "api/user/address/";//修改用户资料(PUT)
    public static final String URL_RESET_USERDATA = SERVERS + "api/users/";//用户资料(GET)
    public static final String URL_RESET_GETALLADDRESS = SERVERS + "api/user/address";//获取所有地址(GET)
    public static final String URL_RESET_DELETEALLADDRESS = SERVERS + "api/user/address/";//删除地址(DELETE)https://badboy.8bears.me/api/user/address/{id}
    public static final String URL_RESET_SETADDRESS_DEFAULT = SERVERS + "api/user/address/default/";//设置默认地址(PUT)
    public static final String URL_USER_CONTACT = SERVERS + "api/users";//用户列表(GET)
    public static final String URL_RESET_SEARCH = SERVERS + "api/users";//用户资料(GET)
    public static final String URL_ADDADDRESS = SERVERS + "api/user/address/";//添加用户地址(POST)
    public static final String URL_UPDATE_GROUP_ICON = SERVERS + "api/im/groups";
    public static final String URL_USER = SERVERS + "api/user/";
    public static final String URL_GETSHOPMAELRCODE = SERVERS + "api/shopCouponPurchases/";//用户购买套餐记录(GET)
    public static final String URL_PAYMENT_ORDERS = SERVERS + "api/payment/orders/";
    public static final String URL_SHOP_CODE = SERVERS + "api/shopCouponPurchases/";//商家套餐二维码
    public static final String URL_INVITATION = SERVERS + "api/posts";//帖子列表(GET)?page={page}&size={size}
    public static final String URL_SENDPOST = SERVERS + "api/post";//发帖(post)
    public static final String URL_BLACKLIST = SERVERS + "api/blackList"; // 拉黑
    public static final String URL_REPOT = SERVERS + "api/post/";
    public static final String URL_POST_LIKE = SERVERS + "api/post";
    public static final String URL_BANNERS = SERVERS + "api/banners";
    public static final String URL_PRODUCTS = SERVERS + "api/products";
    public static final String URL_PRODUCT = SERVERS + "api/product";
    public static final String URL_DISTRICT = SERVERS + "api/tool/district";//地区列表(GET)
    public static final String URL_POST_COMMENT_LIST = SERVERS + "api/post/";
    public static final String URL_USER_STATISTIC = SERVERS + "api/user/";
    public static final String URL_POST_DELETE_COMMENT = SERVERS + "api/posts/comments/";
    public static final String URL_POST_DELETE = SERVERS + "api/posts/";
    public static final String URL_SYSTEM_MESSAGE_COMMENT = SERVERS + "api/msg/comment";
    public static final String URL_SYSTEM_MESSAGE_LIKE = SERVERS + "api/msg/praise";
    public static final String URL_SYSTEM_MESSAGE = SERVERS + "api/msg/system";
    public static final String URL_FOLLOW_UNFOLLOW = SERVERS + "api/follow/";
    public static final String URL_FAV_UNFAV = SERVERS + "api/post/";
    public static final String URL_VERSION = SERVERS + "/api/tool/version";//版本控制(GET)
    public static final String URL_FEEDBACK = SERVERS + "/api/tool/feedback";//反馈(POST)
    public static final String URL_USER_RED = SERVERS + "api/hongBaos";
    public static final String URL_USER_CURRENTACCOUNT = SERVERS + "api/balances/";
    public static final String URL_SHOPS_MEALLIST = SERVERS + "api/shops/";//优惠套餐列表{id}(GET)
    public static final String URL_SHOPS_DELETEMEAL = SERVERS + "api/shopCoupons/";//冻结套餐（DETELE）
    public static final String URL_HONGBAO = SERVERS + "/api/shops/";//冻结套餐（DETELE）
    public static final String URL_SHOPRUNDATA = SERVERS + "api/shops/";//经营数据(GET)
    public static final String URL_PAY_ORDER = SERVERS + "api/payment/orders";//经营数据(GET)
    public static final String URL_ADAMINUPDATE_USER = SERVERS + "api/users/";//管理员修改用户(PUT)
    public static final String URL_SHOPTECHNICIAN_LIST = SERVERS + "api/shops/";//技师接口列表
    public static final String URL_ADDSHOPTECHNICIAN_CODE = SERVERS + "api/shops/";//添加及时
    public static final String URL_ADDSHOPTECHNICIAN_TAGS = SERVERS + "api/tags/";//获取标签
    public static final String URL_UPDATESHOPTECHNICIAN = SERVERS + "api/girls/";//修改技师
    public static final String URL_NEARBY_PEOPLE = SERVERS + "api/recFriends";
    public static final String URL_DRAW_MONEY = SERVERS + "api/userWithdrawApplies";//提现
    public static final String URL_INVITE_FRIEND = SERVERS + "api/invite/";//邀请码提交
    public static final String URL_INVITE_CODE = SERVERS + "api/inviteCode";//邀请码
    public static final String URL_SHARE_INVITE = "http://beboy.me/lead";//分享邀请好友

//    http://api.beboy.me:8081/api/userWithdrawApplies


//    https://api.beboy.me/api/inviteCode

//    http://api.beboy.me:8081/api/userWithdrawApplies invite/{code}
    /**
     * 用户关系
     */
    public static final String URL_USERCREATE_RELATION = SERVERS + "api/MLMRelates";
    public static final String URL_MLMCHILDREN = SERVERS + "api/MLMChildren";
    public static final String URL_MLM_PROFIT = SERVERS + "api/MLMProfit";
    public static final String URL_MLM_PROFIT_WARTER = SERVERS + "api/MLMBalanceLogs";
    //https://api.beboy.me/api/MLMBalanceLogs?page={page}&size={size}

    /**
     * 朋友圈
     */
    public static final String URL_FRIEND = SERVERS + "api/circles";

//    http://api.beboy.me:8081/api/circles

    /**
     * 经理
     */
    public static final String URL_MANAGERLIST = SERVERS + "api/shopManagers";//获取经理列表（get）
    public static final String URL_UPDATEMANAGER = SERVERS + "api/shopManagers/";//获取经理列表（PUT）
    public static final String CONNECTION_STATUS_SUCCESS = "200";
    // 错误码
    public static final int ERROR_CODE_UNAUTHORIZED_401 = 401;
    public static final int ERROR_CODE_SERVER_ERROR_500 = 500;
    public static final int ERROR_CODE_LOGIN_PAST_40103 = 40103;
    public static final int ERROR_CODE_LOGIN_COUNT_50000 = 50000;
    public static final int ERROR_CODE_FUNCTION_NO_OPEN_50001 = 50001;
    public static final int ERROR_CODE_LOGIN_REGISTERCODE_40002 = 40002;
    public static final int ERROR_CODE_LOGIN_USEREDIT_10007 = 10007;
    public static final int ERROR_CEDE_LOGIN_PASSWORD_40102 = 40102;
//    public static final int ERROR_CEDE_LOGIN_PASSWORD_40107 = 40107;
    public static final int ERROR_CEDE_LOGIN_UNREGISTER_40104 = 40104;
    public static final int ERROR_CEDE_LOGIN_NICKNAME_10004 = 10004;
    public static final int ERROR_CEDE_LOGIN_NICKNAME_40005 = 40005;
    public static final int ERROR_CEDE_LOGIN_NICKNAME_10006 = 10006;
    public static final int ERROR_CEDE_LOGIN_FORGER_40302 = 40302;//用户不存在
    public static final int ERROR_CEDE_LOGIN_FORGER_40301 = 40301;//'用户被禁用
    public static final int ERROR_CEDE_REPORT_40101 = 40101;//无权限进行该操作
    public static final int ERROR_CODE_USER_PAY_40004 = 40004;    //余额不足
    public static final int ERROR_CODE_USER_PAY_40105 = 40105;    //支付密码错误
    public static final int ERROR_CODE_USER_PAY_40106 = 40106;    //未设置支付密码
    public static final int ERROR_CODE_USER_PAY_40107 = 40107;    //支付密码被锁定
    public static final int ERROR_CODE_USER_INVITE_40001 = 40001;    //支付密码被锁定

    public static final String ERROR_CODE_LOGIN_NICKNAME_50001 = "50001";
    public static final String ERROR_CODE_LOGIN_NICKNAME_50002 = "50002";
    public static final String ERROR_CODE_LOGIN_NICKNAME_50004 = "50004";
}
